import {RouteRecordRaw} from "vue-router";
import Layout from "@layout/index.vue";
import {JournalOutline} from '@vicons/ionicons5';
import {renderIcon} from "@utils";

const routeName = 'order'


const routes: Array<RouteRecordRaw> = [
    {
        path: `/${routeName}`,
        name: routeName,
        component: () => Layout,
        redirect: `/${routeName}/list`,
        meta: {
            title: '财务管理',
            icon: renderIcon(JournalOutline),
            sort: 2
        },
        children: [
            {
                path: 'list',
                name: `${routeName}_list`,
                meta: {
                    title: '订单列表',
                },
                component: () => import(/* webpackChunkName: "user" */ '@views/order/index.vue'),
            },
            {
                path: 'refund',
                name: `${routeName}_refund`,
                meta: {
                    title: '退款列表',
                },
                component: () => import(/* webpackChunkName: "user" */ '@views/order/refund.vue'),
            }
        ]
    }
]

export default routes